#ifndef USERADDDIALOG_H
#define USERADDDIALOG_H

#include <QtGui/QDialog>

namespace Ui {
    class UserAddDialog;
}

class UserAddDialog : public QDialog {
    Q_OBJECT
public:
    UserAddDialog(QWidget *parent = 0, int id = -1, const QString &name = "", int permissions = 0, bool chgPasswd = 0);
    ~UserAddDialog();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::UserAddDialog *m_ui;
    bool checkDataFullness();
    bool addUserIntoDb();
    bool changeUserPermissions();
    bool changeUserPassword();
    int id;
    bool chgPasswd;
    QString name;
public slots:
    void accept();
};

#endif // USERADDDIALOG_H
